redirect back to the config page after successful settings apply
authorFelix Fietkau <[email protected]>
Fri, 7 Oct 2005 19:30:42 +0000 (19:30 +0000)
committerFelix Fietkau <[email protected]>
Fri, 7 Oct 2005 19:30:42 +0000 (19:30 +0000)
SVN-Revision: 2069

openwrt/package/webif/files/usr/lib/webif/webif.sh
openwrt/package/webif/files/www/cgi-bin/webif/config.sh

index cace65a377429c76713fc41465207cb8b3adc86e..9de03b955b7aceae7450eb4f2f5ccc0ee01b8105 100644 (file)
@@ -170,9 +170,9 @@ footer() {
                        </div>
                        <div class="apply">
                                <div>
-                                       <a href="config.sh?mode=save&amp;cat=$_category">Apply changes &laquo;</a><br />
-                                       <a href="config.sh?mode=clear&amp;cat=$_category">Clear changes &laquo;</a><br />
-                                       <a href="config.sh?mode=review&amp;cat=$_category">Review changes $_changes &laquo;</a>
+                                       <a href="config.sh?mode=save&amp;cat=$_category&amp;prev=$SCRIPT_NAME">Apply changes &laquo;</a><br />
+                                       <a href="config.sh?mode=clear&amp;cat=$_category&amp;prev=$SCRIPT_NAME">Clear changes &laquo;</a><br />
+                                       <a href="config.sh?mode=review&amp;cat=$_category&amp;prev=$SCRIPT_NAME">Review changes $_changes &laquo;</a>
                                </div>
                        </div>
                </div>
index 48e31abd8394f8445cad2d1e381b03db33deb68f..254884fba441549f562243c389879f37daaf2458 100755 (executable)
@@ -13,6 +13,7 @@ case "$FORM_mode" in
                rm -rf /tmp/.webif >&- 2>&- 
                header $FORM_cat . "Configuration: cleared."
                CHANGES=""
+               echo "${FORM_prev:+<meta http-equiv=\"refresh\" content=\"2; URL=$FORM_prev\" />}"
                ;;
        review)
                header $FORM_cat . "Configuration changes:"
@@ -37,6 +38,7 @@ case "$FORM_mode" in
                echo '<pre>'
                sh /usr/lib/webif/apply.sh
                echo '</pre>'
+               echo "${FORM_prev:+<meta http-equiv=\"refresh\" content=\"2; URL=$FORM_prev\" />}"
                ;;
 esac